package restaurant;
public class MenuItem implements Comparable<MenuItem> {

	private String dish;
	private double cost;
	private String category;

	public MenuItem(String dish, double cost, String category) throws CategoryDoseNotExist {
		if (dish=="" )
    		throw new IllegalArgumentException("Empty Value");
		else{
			this.dish = dish;
		}
		if (category=="" )
    		throw new IllegalArgumentException("Empty Value");
		else{
			this.category = category;
		}
		this.cost = cost;
		if(!category.equals("Drinks") &&!category.equals("Starter")&&!category.equals("Main")&&!category.equals("Dessert")){
			throw new CategoryDoseNotExist();
		}
	}

	public String getDish() {
		return dish;
	}

	public void setDish(String dish) {
		this.dish = dish;
	}

	public double getCost() {
		return cost;
	}

	public void setCost(float cost) {
		this.cost = cost;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	@Override
	public int compareTo(MenuItem other) {
		return this.getDish().compareTo(other.getDish());
	}

}
